<%@ page language="java" isELIgnored="false"
	contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Insert title here</title>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
	<script src="/admin/public/html5shiv.min.js"></script>
	<script src="/admin/public/respond.min.js"></script>
<![endif]-->
<!-- Bootstrap core CSS -->
<link href="/admin/public/bootstrap.min.css" title="" rel="stylesheet" />
<link href="/admin/font-awesome/css/font-awesome.min.css"
	rel="stylesheet" />
<link href="/admin/public/animate.css" rel="stylesheet" />
<link rel="stylesheet" href="/admin/public/inspinia.css" />
<link rel="stylesheet" href="/admin/css/pop-up.css" />
<link rel="stylesheet" href="/admin/css/plugins/toastr/toastr.min.css" />
<link rel="stylesheet" type="text/css"
	href="${request.getContext }/admin/css/xcConfirm.css" />
<script src="/admin/My97/WdatePicker.js"></script>
<!-- 时间控件样式 -->
<link
	href="/admin/css/plugins/datetimepicker/bootstrap-datetimepicker.min.css"
	rel="stylesheet" media="screen">
<link href="/admin/public/animate.css" rel="stylesheet">
<link rel="stylesheet" href="/admin/public/inspinia.css" />
<link rel="stylesheet" href="/admin/css/templet_form.css" />
<!-- 图片放大缩小 -->
<link href="/admin/css/YLlightbox.css" rel="stylesheet" type="text/css">
</head>
<body>
	<div id="wrapper" class="container">
		<div class="wrapper wrapper-content">
			<div class="right_box">
				<div style="border: none; box-shadow: none;" class="right_one row">
					<div class="col-md-12 col-sm-12 col-xs-12" style="float: left;">
							<input value="${coursesId }" name="coursesId" id="coursesId" type="hidden" />
							<input value="${panduan }" id="panduan" name="panduan" type="hidden" />
							<input value="${minTime }" id="minTime" type="hidden" />
							<input value="${xlystartTime }" id="xlystartTime" type="hidden" />
							<input value="${xlyendTime }" id="xlyendTime" type="hidden" />
							<a onclick="fh('${coursesId }');"  class="up btn btn-primary btn-xs" >返回课程信息</a>
							<div class="ibox-content">
					<div class="row">
						<div class="col-sm-12">
							<table
								class="table table-striped table-bordered table-hover dataTables-example">
								<thead>
									<tr>
										<th>序号</th>
										<th>微信昵称</th>
										<th>头像</th>
										<th>会员姓名</th>
										<th>会员性别</th>
										<th>会员手机号</th>
										<th>预约时间</th>
										<th>用户类型</th>
									</tr>
								</thead>
								<tbody>
									<c:forEach items="${list}" var="item" varStatus="n">
										<tr>
											<td>${n.index+1 }</td>
											<td>${item.userName }</td>
											<td>
												<div class="YLlightbox" style="text-align: center;">
													<a href="${item.userUrl }" rel="YLlightbox"><img
														src="${item.userUrl }"
														style="width: 25px; height: 25px;"></a>
												</div>
											</td>
											<td>${item.realname }</td>
											<td>
												<c:if test="${item.sex eq 0}">女</c:if>
												<c:if test="${item.sex eq 1}">男</c:if>
											</td>
											<td>${item.telenumber }</td>
											<td>${item.registerDate }</td>
											<td>
												<c:if test="${item.userType eq 0}">管理员</c:if>
												<c:if test="${item.userType eq 1}">会员</c:if>
												<c:if test="${item.userType eq 2}">教练</c:if>
											</td>
										</tr>
									</c:forEach>
								</tbody>
							</table>
						</div>
					</div>
					<div class="row">
						<form action="" id="for" name="for" method="post">
							<input type="hidden" name="yehao" id="yin" value="1"> <input
								type="hidden" name="pagesize" id="tiaoshu"
								value="${page.pageSize }">
							<div class="fy">
								<span style="float: left;">每页条数：</span> <select
									style="width: 70px; float: left;"
									onchange="changeItem(this.value)" id="pagesize" name="pageSize">
									<option value="10" ${page.pageSize==10?'selected':'' }>10</option>
									<option value="20" ${page.pageSize==20?'selected':'' }>20</option>
									<option value="50" ${page.pageSize==50?'selected':'' }>50</option>
									<option value="100" ${page.pageSize==100?'selected':'' }>100</option>
									<option value="200" ${page.pageSize==200?'selected':'' }>200</option>
								</select>
								<div style="height: 27px;" class="col-sm-7">
									<div class="dataTables_paginate paging_simple_numbers"
										id="editable_paginate">
										<ul class="pagination pull-right" style="margin: -3px 0;">
											<li class="paginate_button previous" id="editable_previous">
												<a href="javascript:han(${page.pageNow-1 })"
												aria-controls="editable" data-dt-idx="0" tabindex="0">上一页</a>
											</li>
											<li class="paginate_button previous" id="editable_previous">
												<a aria-controls="editable" style="border: 0"
												data-dt-idx="0" tabindex="1"><input type="text"
													id="current"
													style="width: 32px; height: 19px; text-align: center;"
													value="${page.totalPageCount==0?0:page.pageNow}" /> /
													${page.totalPageCount }</a>
											</li>
											<li class="paginate_button previous" id="editable_previous">
												<a href="javascript:han(${page.pageNow+1 })"
												aria-controls="editable" data-dt-idx="0" tabindex="5">下一页</a>
												<a href="javascript:han($('#current').val())"
												aria-controls="editable" data-dt-idx="0" tabindex="5">跳转</a>
											</li>
										</ul>
									</div>
								</div>
								<div style="float: right;">总共${page.totalCount }条</div>
							</div>

						</form>
					</div>
				</div>
							
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<script src="/admin/public/jquery-1.11.3.js"></script>
	<script src="/admin/public/bootstrap.min.js" type="text/javascript"></script>
	<script src="${request.getContext }/admin/js/xcConfirm.js"
		type="text/javascript" charset="utf-8"></script>
	<script src="/admin/js/plugins/toastr/toastr.min.js"></script>
	<script src="/admin/js/new_page.js"></script>
	<!-- 时间控件样式 -->
	<script
		src="/admin/js/plugins/datetimepicker/bootstrap-datetimepicker.min.js"></script>
	<script
		src="/admin/js/plugins/datetimepicker/bootstrap-datetimepicker-update.min.js"></script>
	<script
		src="/admin/js/plugins/datetimepicker/bootstrap-datetimepicker.zh-CN.js"></script>
	
	<script>
	//分页
	function han(pn){
		document.getElementById("yin").value=pn;
		var biao=document.getElementById("for");
		document.for.action="/courses/selectUserByCoursesId?coursesId="+document.all.coursesId.value+"&panduan="+document.all.panduan.value+"&minTime="+document.all.minTime.value+"&xlystartTime="+document.all.xlystartTime.value+"&xlyendTime="+document.all.xlyendTime.value;
		biao.submit();
	}
	function changeItem(size) {
		document.getElementById("tiaoshu").value=size;
		var biao=document.getElementById("for");
		document.for.action="/courses/selectUserByCoursesId?coursesId="+document.all.coursesId.value+"&panduan="+document.all.panduan.value+"&minTime="+document.all.minTime.value+"&xlystartTime="+document.all.xlystartTime.value+"&xlyendTime="+document.all.xlyendTime.value;
		biao.submit();
	}
	//返回
	function fh(coursesId){
		window.location.href="/courses/alertModel?coursesId="+coursesId+"&panduan="+document.all.panduan.value+"&minTime="+document.all.minTime.value+"&xlystartTime="+document.all.xlystartTime.value+"&xlyendTime="+document.all.xlyendTime.value;
	}
	</script>
		<!-- 图片放大缩小 -->
	<script type="text/javascript">
		;(function($){
			$.fn.hoverDelay = function(options){
					var defaults = {
							hoverDuring: 200,
							outDuring: 200,
							hoverEvent: function(){
									$.noop();
							},
							outEvent: function(){
									$.noop();    
							}
					};
					var sets = $.extend(defaults,options || {});
					var hoverTimer, outTimer;
					return $(this).each(function(){
							$(this).hover(function(){
									clearTimeout(outTimer);
									hoverTimer = setTimeout(sets.hoverEvent, sets.hoverDuring);
							},function(){
									clearTimeout(hoverTimer);
									outTimer = setTimeout(sets.outEvent, sets.outDuring);
							});    
					});
			}      
	})(jQuery);
		$(function(){
			/*1、图片显示与放大；2、图片拖动；3、翻页*/
			$('body').append('<div id="YLimgwrap"><div id="YLimgcon"><h4>鼠标滚动缩放图片<a class="YLt_close" title="关闭"></a><a class="YLt_size" title="原大小"></a></h4><img id="YLimg"><a class="prev" href="javascript:;"></a><a class="next" href="javascript:;"></a></div></div>');
			var base_w,base_h,a_flag_index;
			var imgSrcArray=[];		//当前YLlightbox下目标图片的地址集合
			
			//=======点击要放大的图片=======//
			$('.YLlightbox a[rel="YLlightbox"]').click(function(e){
					e.preventDefault();
					e.stopPropagation();
					//显示图片
					$('#YLimg').attr('src',$(this).attr('href')).css({'max-height':'500px','min-height':'200px'});
					$('#YLimgwrap').show();
					//获取图片尺寸
					var tranImg=new Image();
					tranImg.src=$('#YLimg').attr('src');
					base_w=tranImg.width;		//图片原始宽度
					base_h=tranImg.height;		//图片原始高度
					//定位
					var position_top=($(window).height() - $('#YLimg').height() - 45)/2;
					var position_left=($(window).width() - $('#YLimg').width() -20)/2;
					$('#YLimgcon').css({'top':position_top,'left':position_left});
					//赋值数组(图片地址)
					imgSrcArray=[];		//先清空
					var total_a=$(this).parents('.YLlightbox').find('a[rel="YLlightbox"]');
					for(var i=0; i<total_a.length; i++){		//开始赋值
							imgSrcArray[i]=total_a.eq(i).attr('href');
					}
					a_flag_index=$(this).index();
			});
			//=======原大小=======//
			/* $('#YLimgwrap .YLt_size').click(function(){
					$('#YLimg').width(base_w);		//重置宽高
					$('#YLimg').height(base_h);
					var position_top2=($(window).height() - base_h - 45)/2;
					var position_left2=($(window).width() - base_w -20)/2;
					$('#YLimg').css({'max-height':'','min-height':''});		//清除尺寸限制
					$('#YLimgcon').css({'top':position_top2,'left':position_left2});		//重定位
			}); */
			//=======关闭=======//
			$('#YLimgwrap .YLt_close').click(function(){
					$('#YLimg').attr('src','').width("").height("");		//清除属性
					$('#YLimgwrap').hide();
			});
			//=======移动=======//
			var dragToggle=false;
			var leftLength,topLength;
			$('#YLimgcon').mousedown(function(e){
					e.stopPropagation();
					e.preventDefault();
					leftLength=e.pageX - $(this).position().left;
					topLength=e.pageY - $(this).position().top;
					
					dragToggle=true;
			});
			$(document).mousemove(function(e){
					if(dragToggle)
					$('#YLimgcon').css({'left':e.pageX - leftLength,'top':e.pageY - topLength});
			}).mouseup(function(){
					dragToggle=false;
			});
			//=======鼠标滚动放大缩小图片=======//
			var p_left=$('#YLimgcon').css('left');
			var p_top=$('#YLimgcon').css('top');
			var scrollFunc = function(e){
					e = e || window.event;
					e.stopPropagation();
					if($('#YLimgwrap').css('display') == "block"){
							e.preventDefault();
					}
					var tran_w=$('#YLimg').width();
					var tran_h=$('#YLimg').height();
					if (e.wheelDelta) {		//判断浏览器IE，谷歌滑轮事件
							if (e.wheelDelta > 0) { //当滑轮向上滚动时
									$('#YLimg').width(tran_w * 1.1);
									$('#YLimg').height(tran_h * 1.1);
									$('#YLimg').css({'max-height':'','min-height':''});		//清除尺寸限制
							}
							if (e.wheelDelta < 0 && tran_h>50) { //当滑轮向下滚动时
									$('#YLimg').width(tran_w * 0.9);
									$('#YLimg').height(tran_h * 0.9);
									$('#YLimg').css({'max-height':'','min-height':''});		//清除尺寸限制
							}
					} else if (e.detail) {		//Firefox滑轮事件
							if (e.detail> 0 && tran_h>50) { //当滑轮向下滚动时
									$('#YLimg').width(tran_w * 0.9);
									$('#YLimg').height(tran_h * 0.9);
									$('#YLimg').css({'max-height':'','min-height':''});		//清除尺寸限制
							}
							if (e.detail< 0) { //当滑轮向上滚动时
									$('#YLimg').width(tran_w * 1.1);
									$('#YLimg').height(tran_h * 1.1);
									$('#YLimg').css({'max-height':'','min-height':''});		//清除尺寸限制
							}
					}
					var tran_position_top=($(window).height() - $('#YLimg').height() - 45)/2;
					var tran_position_left=($(window).width() - $('#YLimg').width() -20)/2;
					$('#YLimgcon').css({'top':tran_position_top,'left':tran_position_left});		//重定位
			}
			//给页面绑定滑轮滚动事件  
			if (document.addEventListener) {	//firefox
					document.addEventListener('DOMMouseScroll', scrollFunc, false);
			}  
			//滚动滑轮触发scrollFunc方法  //ie 谷歌  
			window.onmousewheel = document.onmousewheel = scrollFunc;
			
	});
		</script>
</body>
</html>